{% extends "admin/base_site.html" %}
{% load i18n %}
{% load url from future %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}/admin/css/forms.css" />{% endblock %}

{% block breadcrumbs %}

<ul class="breadcrumb">
    <li><a href="../">{% trans 'Home' %}</a> <span class="divider">/</span></li>
    <li class="active">{% trans 'Password change' %}</li>
</ul>
{% endblock %}

{% block title %}{% trans 'Password change' %}{% endblock %}

{% block userlinks %}
    <script type="text/javascript">
        document.getElementById("welcome").className="";
        document.getElementById("change_passwd").className="active";
    </script>
{% endblock %}

{% block content %}<div id="content-main">

<form action="" method="post">{% csrf_token %}
<div class="well" style="margin-top:20px;">
{% if form.errors %}
    <p class="alert alert-error">
    {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    </p>
{% endif %}

<h3>{% trans 'Password change' %}</h3>

<p class="alert alert-info">{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>

<fieldset class="module aligned wide">

<div class="form-row">
    {% if form.old_password.errors %}<div class="alert alert-error">{{ form.old_password.errors }}</div>{%  endif %}
    <label for="id_old_password" class="required">{% trans 'Old password' %}:</label>{{ form.old_password }}
</div>

<div class="form-row">
    {% if form.new_password1.errors %}<div class="alert alert-error">{{ form.new_password1.errors }}</div>{% endif %}
    <label for="id_new_password1" class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }}
</div>

<div class="form-row">
    {% if form.new_password2.errors %}<div class="alert alert-error">{{ form.new_password2.errors }}</div>{% endif %}
    <label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }}
</div>

</fieldset>

<input type="submit" value="{% trans 'Change my password' %}" class="btn btn-primary" style="margin:10px 0 0 200px;" />

<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
</div>
</form></div>

{% endblock %}
